import request from '@/api/request'

/**
 * 
 * @param 新增用户 
 */
export function add (params) {
    return request({
      url: `/deviceType`,
      method: 'post',
      data: params
    })
}

/**
 * 
 * @param 修改用户 
 */
export function update (params) {
    return request({
      url: `/deviceType`,
      method: 'put',
      data: params
    })
}

/**
 * 
 * @param 查询用户 
 */
export function getList (params) {
    return request({
      url: `/deviceType`,
      method: 'get',
      params
    })
}

/**
 * 
 * @param 删除用户 
 */
export function deleteDevice (id) {
    return request({
      url: `/deviceType/${id}`,
      method: 'delete',
    })
}

/**
 * 
 * @param 获取设备列表 
 */
export function deviceTypeList () {
  return request({
    url: `/deviceType/list`,
    method: 'get',
  })
}

/**
 * 
 * @param 获取可用设备列表 
 */
export function available () {
  return request({
    url: `/device/available`,
    method: 'get',
  })
}

export function getTypeTree (params) {
  return request({
    url: `/deviceType/getTypeTree`,
    method: 'post',
    data: params
  })
}


